﻿using UnityEngine;
using System.Collections;

using UnityEngine.UI;
public class GameController_Stream : MonoBehaviour 
{
    public  float speed = 3;
    [SerializeField]
    private Text menuScoreLable;
    [SerializeField]
    private AudioClip dead;
    [SerializeField]
    private Canvas gameOverPanel;
    private GameController_ScoreManager scoreManager;

    void Awake() 
    {
        scoreManager = FindObjectOfType<GameController_ScoreManager>();
    }
    void Start() 
    {
        Time.timeScale = 1;
    }
    void Update() 
    {
        speed += Time.deltaTime/10;
    }

    public void GameOver()
    {
        menuScoreLable.text = scoreManager.Score.ToString();
        audio.PlayOneShot(dead);
        gameOverPanel.enabled = true;
    }
}
